package teste;

import org.hibernate.Session;
import util.HibernateUtil;

public class Conecta {

    public static void main(String args[]) {
        Session sessao = null;
        try {
            sessao = HibernateUtil.getSessionFactory().openSession();
            System.err.println("Conectou!");
        } finally {
            sessao.close();
            System.err.println("Fechou conexão!");
        }
    }
}
